Better fix to detect failed patch application when building
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 19 Oct 2005 12:39:59 +0000 (13:39 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 19 Oct 2005 12:39:59 +0000 (13:39 +0100)
guest kernels.
Signed-off-by: Muli Ben-Yehuda <mulix@mulix.org>
buildconfigs/Rules.mk

index 2970945810453be4eef164a14e98d0e6c27ed3fe..5b70d23508d127a80cdea081297266a5a3965ca3 100644 (file)
@@ -80,11 +80,12 @@ clean::
        rm -f patches/*/.makedep
 
 ref-%/.valid-ref: pristine-%/.valid-pristine
+       set -e
        rm -rf $(@D)
        cp -al $(<D) $(@D)
-       which patch || exit 1
-       ([ -d patches/$* ] && \
-         for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || exit 1 ) ; done) || true
+       if [ -d patches/$* ] ; then \
+           for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || exit 1 ) ; done ; \
+       fi
        touch $@ # update timestamp to avoid rebuild
 endif